#!/bin/sh

echo "Generating javadoc START..."

mkdir -p generated
echo "  . mvn javadoc:aggregate"
mvn javadoc:aggregate > /dev/null
echo "  . mkdir -p chord-proactive-javadoc"
mkdir -p chord-proactive-javadoc
echo "  . cp -r target/site/apidocs/* chord-proactive-javadoc"
cp -r target/site/apidocs/* chord-proactive-javadoc
echo "  . rm -rf target/"
rm -rf target/
echo "  . tar -cjpf chord-proative-javadoc.tar.bz2 chord-proactive-javadoc"
tar -cjpf chord-proactive-javadoc.tar.bz2 chord-proactive-javadoc
echo "  . mv chord-proactive-javadoc.tar.bz2 generated"
mv chord-proactive-javadoc.tar.bz2 generated
echo "  . rm -rf chord-proactive-javadoc"
rm -rf chord-proactive-javadoc

echo "Generating javadoc END"
echo
ls -l generated/

